package com.example.myapplicationndk.viewmodel;

import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;

public class MyViewModelFactory implements ViewModelProvider.Factory {

    private Integer mParam;


    public MyViewModelFactory(Integer param) {
        this.mParam = param;
    }


    @Override
    public <T extends ViewModel> T create(Class<T> modelClass) {
        return (T) new MainModel(mParam);
    }
}